#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<random>
#include<algorithm>
#define N 5000
using namespace std;
mt19937 RAND(random_device{}());
int n,p[N+1];
int main()
{
	freopen("game.in","w",stdout);
	n=RAND()%4999+2;
	cout<<n<<' '<<60000<<endl;
	for (int i=1;i<=n;++i) p[i]=i;
	shuffle(p+1,p+n+1,RAND);
	for (int i=1;i<=n;++i) cout<<p[i]<<' ';
	cout<<endl;
	return 0;
}
